package com.wehealth.widget;

import u.aly.cp;

import com.wehealth.R;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.EditText;

public class LineEditText extends EditText{

	private Paint mPaint;
	public LineEditText(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
		
        mPaint = new Paint();  
        TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LineEditText);
        int paintColor = a.getResourceId(R.styleable.LineEditText_paintColor,Color.WHITE);
        Log.d("SIMMON", "paintColor ="+paintColor);
        a.recycle();
        mPaint.setStyle(Paint.Style.STROKE);  
        mPaint.setColor(Color.WHITE);  
	}
	@Override
	public void draw(Canvas canvas) {
		// TODO Auto-generated method stub
		super.draw(canvas);
	     canvas.drawLine(0,this.getHeight()-1,  this.getWidth()-1, this.getHeight()-1, mPaint); 
	}
	
	
	
	
	

}
